<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    
    <title>numpy.chararray &mdash; NumPy v1.18 Manual</title>
    
    <link rel="stylesheet" type="text/css" href="../../_static/css/spc-bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../../_static/css/spc-extend.css">
    <link rel="stylesheet" href="../../_static/scipy.css" type="text/css" >
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" >
    <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" >
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.18.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/language_data.js"></script>
    <script type="text/javascript" src="../../_static/js/copybutton.js"></script>
    <link rel="author" title="About these documents" href="../../about.html" >
    <link rel="index" title="Index" href="../../genindex.html" >
    <link rel="search" title="Search" href="../../search.html" >
    <link rel="top" title="NumPy v1.18 Manual" href="../../index.html" >
    <link rel="up" title="Standard array subclasses" href="../arrays.classes.html" >
    <link rel="next" title="numpy.chararray.astype" href="numpy.chararray.astype.html" >
    <link rel="prev" title="numpy.memmap.flush" href="numpy.memmap.flush.html" > 
  </head>
  <body>
<div class="container">
  <div class="top-scipy-org-logo-header" style="background-color: #a2bae8;">
    <a href="../../index.html">
      <img border=0 alt="NumPy" src="../../_static/numpy_logo.png"></a>
    </div>
  </div>
</div>


    <div class="container">
      <div class="main">
        
	<div class="row-fluid">
	  <div class="span12">
	    <div class="spc-navbar">
              
    <ul class="nav nav-pills pull-left">
        <li class="active"><a href="https://numpy.org/">NumPy.org</a></li>
        <li class="active"><a href="https://numpy.org/doc">Docs</a></li>
        
        <li class="active"><a href="../../index.html">NumPy v1.18 Manual</a></li>
        

          <li class="active"><a href="../index.html" >NumPy Reference</a></li>
          <li class="active"><a href="../arrays.html" >Array objects</a></li>
          <li class="active"><a href="../arrays.classes.html" accesskey="U">Standard array subclasses</a></li> 
    </ul>
              
              
    <ul class="nav nav-pills pull-right">
      <li class="active">
        <a href="../../genindex.html" title="General Index"
           accesskey="I">index</a>
      </li>
      <li class="active">
        <a href="numpy.chararray.astype.html" title="numpy.chararray.astype"
           accesskey="N">next</a>
      </li>
      <li class="active">
        <a href="numpy.memmap.flush.html" title="numpy.memmap.flush"
           accesskey="P">previous</a>
      </li>
    </ul>
              
	    </div>
	  </div>
	</div>
        

	<div class="row-fluid">
      <div class="spc-rightsidebar span3">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="numpy.memmap.flush.html"
                        title="previous chapter">numpy.memmap.flush</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="numpy.chararray.astype.html"
                        title="next chapter">numpy.chararray.astype</a></p>
<div id="searchbox" style="display: none" role="search">
  <h4>Quick search</h4>
    <div>
    <form class="search" action="../../search.html" method="get">
      <input type="text" style="width: inherit;" name="q" />
      <input type="submit" value="search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
          <div class="span9">
            
        <div class="bodywrapper">
          <div class="body" id="spc-section-body">
            
  <div class="section" id="numpy-chararray">
<h1>numpy.chararray<a class="headerlink" href="#numpy-chararray" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="numpy.chararray">
<em class="property">class </em><code class="sig-prename descclassname">numpy.</code><code class="sig-name descname">chararray</code><span class="sig-paren">(</span><em class="sig-param">shape</em>, <em class="sig-param">itemsize=1</em>, <em class="sig-param">unicode=False</em>, <em class="sig-param">buffer=None</em>, <em class="sig-param">offset=0</em>, <em class="sig-param">strides=None</em>, <em class="sig-param">order=None</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/numpy/numpy/blob/v1.18.1/numpy/__init__.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#numpy.chararray" title="Permalink to this definition">¶</a></dt>
<dd><p>Provides a convenient view on arrays of string and unicode values.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <a class="reference internal" href="#numpy.chararray" title="numpy.chararray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">chararray</span></code></a> class exists for backwards compatibility with
Numarray, it is not recommended for new development. Starting from numpy
1.4, if one needs arrays of strings, it is recommended to use arrays of
<a class="reference internal" href="numpy.dtype.html#numpy.dtype" title="numpy.dtype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dtype</span></code></a> <code class="xref py py-obj docutils literal notranslate"><span class="pre">object_</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">string_</span></code> or <code class="xref py py-obj docutils literal notranslate"><span class="pre">unicode_</span></code>, and use the free functions
in the <a class="reference internal" href="../routines.char.html#module-numpy.char" title="numpy.char"><code class="xref py py-obj docutils literal notranslate"><span class="pre">numpy.char</span></code></a> module for fast vectorized string operations.</p>
</div>
<p>Versus a regular NumPy array of type <a class="reference external" href="https://docs.python.org/dev/library/stdtypes.html#str" title="(in Python v3.9)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">str</span></code></a> or <code class="xref py py-obj docutils literal notranslate"><span class="pre">unicode</span></code>, this
class adds the following functionality:</p>
<blockquote>
<div><ol class="arabic simple">
<li><p>values automatically have whitespace removed from the end
when indexed</p></li>
<li><p>comparison operators automatically remove whitespace from the
end when comparing values</p></li>
<li><p>vectorized string operations are provided as methods
(e.g. <a class="reference internal" href="numpy.chararray.endswith.html#numpy.chararray.endswith" title="numpy.chararray.endswith"><code class="xref py py-obj docutils literal notranslate"><span class="pre">endswith</span></code></a>) and infix operators (e.g. <code class="docutils literal notranslate"><span class="pre">&quot;+&quot;,</span> <span class="pre">&quot;*&quot;,</span> <span class="pre">&quot;%&quot;</span></code>)</p></li>
</ol>
</div></blockquote>
<p>chararrays should be created using <a class="reference internal" href="numpy.char.array.html#numpy.char.array" title="numpy.char.array"><code class="xref py py-obj docutils literal notranslate"><span class="pre">numpy.char.array</span></code></a> or
<a class="reference internal" href="numpy.char.asarray.html#numpy.char.asarray" title="numpy.char.asarray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">numpy.char.asarray</span></code></a>, rather than this constructor directly.</p>
<p>This constructor creates the array, using <em class="xref py py-obj">buffer</em> (with <em class="xref py py-obj">offset</em>
and <a class="reference internal" href="numpy.chararray.strides.html#numpy.chararray.strides" title="numpy.chararray.strides"><code class="xref py py-obj docutils literal notranslate"><span class="pre">strides</span></code></a>) if it is not <code class="docutils literal notranslate"><span class="pre">None</span></code>. If <em class="xref py py-obj">buffer</em> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, then
constructs a new array with <a class="reference internal" href="numpy.chararray.strides.html#numpy.chararray.strides" title="numpy.chararray.strides"><code class="xref py py-obj docutils literal notranslate"><span class="pre">strides</span></code></a> in “C order”, unless both
<code class="docutils literal notranslate"><span class="pre">len(shape)</span> <span class="pre">&gt;=</span> <span class="pre">2</span></code> and <code class="docutils literal notranslate"><span class="pre">order='F'</span></code>, in which case <a class="reference internal" href="numpy.chararray.strides.html#numpy.chararray.strides" title="numpy.chararray.strides"><code class="xref py py-obj docutils literal notranslate"><span class="pre">strides</span></code></a>
is in “Fortran order”.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>shape</strong><span class="classifier">tuple</span></dt><dd><p>Shape of the array.</p>
</dd>
<dt><strong>itemsize</strong><span class="classifier">int, optional</span></dt><dd><p>Length of each array element, in number of characters. Default is 1.</p>
</dd>
<dt><strong>unicode</strong><span class="classifier">bool, optional</span></dt><dd><p>Are the array elements of type unicode (True) or string (False).
Default is False.</p>
</dd>
<dt><strong>buffer</strong><span class="classifier">int, optional</span></dt><dd><p>Memory address of the start of the array data.  Default is None,
in which case a new array is created.</p>
</dd>
<dt><strong>offset</strong><span class="classifier">int, optional</span></dt><dd><p>Fixed stride displacement from the beginning of an axis?
Default is 0. Needs to be &gt;=0.</p>
</dd>
<dt><strong>strides</strong><span class="classifier">array_like of ints, optional</span></dt><dd><p>Strides for the array (see <a class="reference internal" href="numpy.ndarray.strides.html#numpy.ndarray.strides" title="numpy.ndarray.strides"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ndarray.strides</span></code></a> for full description).
Default is None.</p>
</dd>
<dt><strong>order</strong><span class="classifier">{‘C’, ‘F’}, optional</span></dt><dd><p>The order in which the array data is stored in memory: ‘C’ -&gt;
“row major” order (the default), ‘F’ -&gt; “column major”
(Fortran) order.</p>
</dd>
</dl>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">chararray</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span><span class="p">[:]</span> <span class="o">=</span> <span class="s1">&#39;a&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span>
<span class="go">chararray([[b&#39;a&#39;, b&#39;a&#39;, b&#39;a&#39;],</span>
<span class="go">           [b&#39;a&#39;, b&#39;a&#39;, b&#39;a&#39;],</span>
<span class="go">           [b&#39;a&#39;, b&#39;a&#39;, b&#39;a&#39;]], dtype=&#39;|S1&#39;)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">chararray</span><span class="p">(</span><span class="n">charar</span><span class="o">.</span><span class="n">shape</span><span class="p">,</span> <span class="n">itemsize</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span><span class="p">[:]</span> <span class="o">=</span> <span class="s1">&#39;abc&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span>
<span class="go">chararray([[b&#39;abc&#39;, b&#39;abc&#39;, b&#39;abc&#39;],</span>
<span class="go">           [b&#39;abc&#39;, b&#39;abc&#39;, b&#39;abc&#39;],</span>
<span class="go">           [b&#39;abc&#39;, b&#39;abc&#39;, b&#39;abc&#39;]], dtype=&#39;|S5&#39;)</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Attributes</dt>
<dd class="field-odd"><dl class="simple">
<dt><a class="reference internal" href="numpy.chararray.T.html#numpy.chararray.T" title="numpy.chararray.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">T</span></code></a></dt><dd><p>The transposed array.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.base.html#numpy.chararray.base" title="numpy.chararray.base"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base</span></code></a></dt><dd><p>Base object if memory is from some other object.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.ctypes.html#numpy.chararray.ctypes" title="numpy.chararray.ctypes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ctypes</span></code></a></dt><dd><p>An object to simplify the interaction of the array with the ctypes module.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.data.html#numpy.chararray.data" title="numpy.chararray.data"><code class="xref py py-obj docutils literal notranslate"><span class="pre">data</span></code></a></dt><dd><p>Python buffer object pointing to the start of the array’s data.</p>
</dd>
<dt><a class="reference internal" href="numpy.dtype.html#numpy.dtype" title="numpy.dtype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dtype</span></code></a></dt><dd><p>Data-type of the array’s elements.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.flags.html#numpy.chararray.flags" title="numpy.chararray.flags"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flags</span></code></a></dt><dd><p>Information about the memory layout of the array.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.flat.html#numpy.chararray.flat" title="numpy.chararray.flat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flat</span></code></a></dt><dd><p>A 1-D iterator over the array.</p>
</dd>
<dt><a class="reference internal" href="numpy.imag.html#numpy.imag" title="numpy.imag"><code class="xref py py-obj docutils literal notranslate"><span class="pre">imag</span></code></a></dt><dd><p>The imaginary part of the array.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.itemsize.html#numpy.chararray.itemsize" title="numpy.chararray.itemsize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">itemsize</span></code></a></dt><dd><p>Length of one array element in bytes.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.nbytes.html#numpy.chararray.nbytes" title="numpy.chararray.nbytes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nbytes</span></code></a></dt><dd><p>Total bytes consumed by the elements of the array.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.ndim.html#numpy.chararray.ndim" title="numpy.chararray.ndim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ndim</span></code></a></dt><dd><p>Number of array dimensions.</p>
</dd>
<dt><a class="reference internal" href="numpy.real.html#numpy.real" title="numpy.real"><code class="xref py py-obj docutils literal notranslate"><span class="pre">real</span></code></a></dt><dd><p>The real part of the array.</p>
</dd>
<dt><a class="reference internal" href="numpy.shape.html#numpy.shape" title="numpy.shape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">shape</span></code></a></dt><dd><p>Tuple of array dimensions.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.size.html#numpy.chararray.size" title="numpy.chararray.size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">size</span></code></a></dt><dd><p>Number of elements in the array.</p>
</dd>
<dt><a class="reference internal" href="numpy.chararray.strides.html#numpy.chararray.strides" title="numpy.chararray.strides"><code class="xref py py-obj docutils literal notranslate"><span class="pre">strides</span></code></a></dt><dd><p>Tuple of bytes to step in each dimension when traversing an array.</p>
</dd>
</dl>
</dd>
</dl>
<p class="rubric">Methods</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.astype.html#numpy.chararray.astype" title="numpy.chararray.astype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">astype</span></code></a>(dtype[, order, casting, subok, copy])</p></td>
<td><p>Copy of the array, cast to a specified type.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.argsort.html#numpy.chararray.argsort" title="numpy.chararray.argsort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">argsort</span></code></a>([axis, kind, order])</p></td>
<td><p>Returns the indices that would sort this array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.copy.html#numpy.chararray.copy" title="numpy.chararray.copy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">copy</span></code></a>([order])</p></td>
<td><p>Return a copy of the array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.count.html#numpy.chararray.count" title="numpy.chararray.count"><code class="xref py py-obj docutils literal notranslate"><span class="pre">count</span></code></a>(self, sub[, start, end])</p></td>
<td><p>Returns an array with the number of non-overlapping occurrences of substring <em class="xref py py-obj">sub</em> in the range [<em class="xref py py-obj">start</em>, <em class="xref py py-obj">end</em>].</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.decode.html#numpy.chararray.decode" title="numpy.chararray.decode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">decode</span></code></a>(self[, encoding, errors])</p></td>
<td><p>Calls <em class="xref py py-obj">str.decode</em> element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.dump.html#numpy.chararray.dump" title="numpy.chararray.dump"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dump</span></code></a>(file)</p></td>
<td><p>Dump a pickle of the array to the specified file.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.dumps.html#numpy.chararray.dumps" title="numpy.chararray.dumps"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dumps</span></code></a>()</p></td>
<td><p>Returns the pickle of the array as a string.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.encode.html#numpy.chararray.encode" title="numpy.chararray.encode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">encode</span></code></a>(self[, encoding, errors])</p></td>
<td><p>Calls <a class="reference external" href="https://docs.python.org/dev/library/stdtypes.html#str.encode" title="(in Python v3.9)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">str.encode</span></code></a> element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.endswith.html#numpy.chararray.endswith" title="numpy.chararray.endswith"><code class="xref py py-obj docutils literal notranslate"><span class="pre">endswith</span></code></a>(self, suffix[, start, end])</p></td>
<td><p>Returns a boolean array which is <em class="xref py py-obj">True</em> where the string element in <em class="xref py py-obj">self</em> ends with <em class="xref py py-obj">suffix</em>, otherwise <em class="xref py py-obj">False</em>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.expandtabs.html#numpy.chararray.expandtabs" title="numpy.chararray.expandtabs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">expandtabs</span></code></a>(self[, tabsize])</p></td>
<td><p>Return a copy of each string element where all tab characters are replaced by one or more spaces.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.fill.html#numpy.chararray.fill" title="numpy.chararray.fill"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fill</span></code></a>(value)</p></td>
<td><p>Fill the array with a scalar value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.find.html#numpy.chararray.find" title="numpy.chararray.find"><code class="xref py py-obj docutils literal notranslate"><span class="pre">find</span></code></a>(self, sub[, start, end])</p></td>
<td><p>For each element, return the lowest index in the string where substring <em class="xref py py-obj">sub</em> is found.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.flatten.html#numpy.chararray.flatten" title="numpy.chararray.flatten"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flatten</span></code></a>([order])</p></td>
<td><p>Return a copy of the array collapsed into one dimension.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.getfield.html#numpy.chararray.getfield" title="numpy.chararray.getfield"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getfield</span></code></a>(dtype[, offset])</p></td>
<td><p>Returns a field of the given array as a certain type.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.index.html#numpy.chararray.index" title="numpy.chararray.index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">index</span></code></a>(self, sub[, start, end])</p></td>
<td><p>Like <a class="reference internal" href="numpy.chararray.find.html#numpy.chararray.find" title="numpy.chararray.find"><code class="xref py py-obj docutils literal notranslate"><span class="pre">find</span></code></a>, but raises <em class="xref py py-obj">ValueError</em> when the substring is not found.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.isalnum.html#numpy.chararray.isalnum" title="numpy.chararray.isalnum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isalnum</span></code></a>(self)</p></td>
<td><p>Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.isalpha.html#numpy.chararray.isalpha" title="numpy.chararray.isalpha"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isalpha</span></code></a>(self)</p></td>
<td><p>Returns true for each element if all characters in the string are alphabetic and there is at least one character, false otherwise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.isdecimal.html#numpy.chararray.isdecimal" title="numpy.chararray.isdecimal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isdecimal</span></code></a>(self)</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return True if there are only decimal characters in the element.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.isdigit.html#numpy.chararray.isdigit" title="numpy.chararray.isdigit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isdigit</span></code></a>(self)</p></td>
<td><p>Returns true for each element if all characters in the string are digits and there is at least one character, false otherwise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.islower.html#numpy.chararray.islower" title="numpy.chararray.islower"><code class="xref py py-obj docutils literal notranslate"><span class="pre">islower</span></code></a>(self)</p></td>
<td><p>Returns true for each element if all cased characters in the string are lowercase and there is at least one cased character, false otherwise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.isnumeric.html#numpy.chararray.isnumeric" title="numpy.chararray.isnumeric"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isnumeric</span></code></a>(self)</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return True if there are only numeric characters in the element.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.isspace.html#numpy.chararray.isspace" title="numpy.chararray.isspace"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isspace</span></code></a>(self)</p></td>
<td><p>Returns true for each element if there are only whitespace characters in the string and there is at least one character, false otherwise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.istitle.html#numpy.chararray.istitle" title="numpy.chararray.istitle"><code class="xref py py-obj docutils literal notranslate"><span class="pre">istitle</span></code></a>(self)</p></td>
<td><p>Returns true for each element if the element is a titlecased string and there is at least one character, false otherwise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.isupper.html#numpy.chararray.isupper" title="numpy.chararray.isupper"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isupper</span></code></a>(self)</p></td>
<td><p>Returns true for each element if all cased characters in the string are uppercase and there is at least one character, false otherwise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.item.html#numpy.chararray.item" title="numpy.chararray.item"><code class="xref py py-obj docutils literal notranslate"><span class="pre">item</span></code></a>(*args)</p></td>
<td><p>Copy an element of an array to a standard Python scalar and return it.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.join.html#numpy.chararray.join" title="numpy.chararray.join"><code class="xref py py-obj docutils literal notranslate"><span class="pre">join</span></code></a>(self, seq)</p></td>
<td><p>Return a string which is the concatenation of the strings in the sequence <em class="xref py py-obj">seq</em>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.ljust.html#numpy.chararray.ljust" title="numpy.chararray.ljust"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ljust</span></code></a>(self, width[, fillchar])</p></td>
<td><p>Return an array with the elements of <em class="xref py py-obj">self</em> left-justified in a string of length <em class="xref py py-obj">width</em>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.lower.html#numpy.chararray.lower" title="numpy.chararray.lower"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lower</span></code></a>(self)</p></td>
<td><p>Return an array with the elements of <em class="xref py py-obj">self</em> converted to lowercase.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.lstrip.html#numpy.chararray.lstrip" title="numpy.chararray.lstrip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lstrip</span></code></a>(self[, chars])</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a copy with the leading characters removed.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.nonzero.html#numpy.chararray.nonzero" title="numpy.chararray.nonzero"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nonzero</span></code></a>()</p></td>
<td><p>Return the indices of the elements that are non-zero.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.put.html#numpy.chararray.put" title="numpy.chararray.put"><code class="xref py py-obj docutils literal notranslate"><span class="pre">put</span></code></a>(indices, values[, mode])</p></td>
<td><p>Set <code class="docutils literal notranslate"><span class="pre">a.flat[n]</span> <span class="pre">=</span> <span class="pre">values[n]</span></code> for all <em class="xref py py-obj">n</em> in indices.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.ravel.html#numpy.chararray.ravel" title="numpy.chararray.ravel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ravel</span></code></a>([order])</p></td>
<td><p>Return a flattened array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.repeat.html#numpy.chararray.repeat" title="numpy.chararray.repeat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">repeat</span></code></a>(repeats[, axis])</p></td>
<td><p>Repeat elements of an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.replace.html#numpy.chararray.replace" title="numpy.chararray.replace"><code class="xref py py-obj docutils literal notranslate"><span class="pre">replace</span></code></a>(self, old, new[, count])</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a copy of the string with all occurrences of substring <em class="xref py py-obj">old</em> replaced by <em class="xref py py-obj">new</em>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.reshape.html#numpy.chararray.reshape" title="numpy.chararray.reshape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">reshape</span></code></a>(shape[, order])</p></td>
<td><p>Returns an array containing the same data with a new shape.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.resize.html#numpy.chararray.resize" title="numpy.chararray.resize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">resize</span></code></a>(new_shape[, refcheck])</p></td>
<td><p>Change shape and size of array in-place.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.rfind.html#numpy.chararray.rfind" title="numpy.chararray.rfind"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rfind</span></code></a>(self, sub[, start, end])</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return the highest index in the string where substring <em class="xref py py-obj">sub</em> is found, such that <em class="xref py py-obj">sub</em> is contained within [<em class="xref py py-obj">start</em>, <em class="xref py py-obj">end</em>].</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.rindex.html#numpy.chararray.rindex" title="numpy.chararray.rindex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rindex</span></code></a>(self, sub[, start, end])</p></td>
<td><p>Like <a class="reference internal" href="numpy.chararray.rfind.html#numpy.chararray.rfind" title="numpy.chararray.rfind"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rfind</span></code></a>, but raises <em class="xref py py-obj">ValueError</em> when the substring <em class="xref py py-obj">sub</em> is not found.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.rjust.html#numpy.chararray.rjust" title="numpy.chararray.rjust"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rjust</span></code></a>(self, width[, fillchar])</p></td>
<td><p>Return an array with the elements of <em class="xref py py-obj">self</em> right-justified in a string of length <em class="xref py py-obj">width</em>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.rsplit.html#numpy.chararray.rsplit" title="numpy.chararray.rsplit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rsplit</span></code></a>(self[, sep, maxsplit])</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a list of the words in the string, using <em class="xref py py-obj">sep</em> as the delimiter string.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.rstrip.html#numpy.chararray.rstrip" title="numpy.chararray.rstrip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rstrip</span></code></a>(self[, chars])</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a copy with the trailing characters removed.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.searchsorted.html#numpy.chararray.searchsorted" title="numpy.chararray.searchsorted"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searchsorted</span></code></a>(v[, side, sorter])</p></td>
<td><p>Find indices where elements of v should be inserted in a to maintain order.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.setfield.html#numpy.chararray.setfield" title="numpy.chararray.setfield"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setfield</span></code></a>(val, dtype[, offset])</p></td>
<td><p>Put a value into a specified place in a field defined by a data-type.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.setflags.html#numpy.chararray.setflags" title="numpy.chararray.setflags"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setflags</span></code></a>([write, align, uic])</p></td>
<td><p>Set array flags WRITEABLE, ALIGNED, (WRITEBACKIFCOPY and UPDATEIFCOPY), respectively.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.sort.html#numpy.chararray.sort" title="numpy.chararray.sort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sort</span></code></a>([axis, kind, order])</p></td>
<td><p>Sort an array in-place.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.split.html#numpy.chararray.split" title="numpy.chararray.split"><code class="xref py py-obj docutils literal notranslate"><span class="pre">split</span></code></a>(self[, sep, maxsplit])</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a list of the words in the string, using <em class="xref py py-obj">sep</em> as the delimiter string.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.splitlines.html#numpy.chararray.splitlines" title="numpy.chararray.splitlines"><code class="xref py py-obj docutils literal notranslate"><span class="pre">splitlines</span></code></a>(self[, keepends])</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a list of the lines in the element, breaking at line boundaries.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.squeeze.html#numpy.chararray.squeeze" title="numpy.chararray.squeeze"><code class="xref py py-obj docutils literal notranslate"><span class="pre">squeeze</span></code></a>([axis])</p></td>
<td><p>Remove single-dimensional entries from the shape of <em class="xref py py-obj">a</em>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.startswith.html#numpy.chararray.startswith" title="numpy.chararray.startswith"><code class="xref py py-obj docutils literal notranslate"><span class="pre">startswith</span></code></a>(self, prefix[, start, end])</p></td>
<td><p>Returns a boolean array which is <em class="xref py py-obj">True</em> where the string element in <em class="xref py py-obj">self</em> starts with <em class="xref py py-obj">prefix</em>, otherwise <em class="xref py py-obj">False</em>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.strip.html#numpy.chararray.strip" title="numpy.chararray.strip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">strip</span></code></a>(self[, chars])</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a copy with the leading and trailing characters removed.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.swapaxes.html#numpy.chararray.swapaxes" title="numpy.chararray.swapaxes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">swapaxes</span></code></a>(axis1, axis2)</p></td>
<td><p>Return a view of the array with <em class="xref py py-obj">axis1</em> and <em class="xref py py-obj">axis2</em> interchanged.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.swapcase.html#numpy.chararray.swapcase" title="numpy.chararray.swapcase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">swapcase</span></code></a>(self)</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a copy of the string with uppercase characters converted to lowercase and vice versa.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.take.html#numpy.chararray.take" title="numpy.chararray.take"><code class="xref py py-obj docutils literal notranslate"><span class="pre">take</span></code></a>(indices[, axis, out, mode])</p></td>
<td><p>Return an array formed from the elements of <em class="xref py py-obj">a</em> at the given indices.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.title.html#numpy.chararray.title" title="numpy.chararray.title"><code class="xref py py-obj docutils literal notranslate"><span class="pre">title</span></code></a>(self)</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a titlecased version of the string: words start with uppercase characters, all remaining cased characters are lowercase.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.tofile.html#numpy.chararray.tofile" title="numpy.chararray.tofile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tofile</span></code></a>(fid[, sep, format])</p></td>
<td><p>Write array to a file as text or binary (default).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.tolist.html#numpy.chararray.tolist" title="numpy.chararray.tolist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tolist</span></code></a>()</p></td>
<td><p>Return the array as an <code class="docutils literal notranslate"><span class="pre">a.ndim</span></code>-levels deep nested list of Python scalars.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.tostring.html#numpy.chararray.tostring" title="numpy.chararray.tostring"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tostring</span></code></a>([order])</p></td>
<td><p>Construct Python bytes containing the raw data bytes in the array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.translate.html#numpy.chararray.translate" title="numpy.chararray.translate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">translate</span></code></a>(self, table[, deletechars])</p></td>
<td><p>For each element in <em class="xref py py-obj">self</em>, return a copy of the string where all characters occurring in the optional argument <em class="xref py py-obj">deletechars</em> are removed, and the remaining characters have been mapped through the given translation table.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.transpose.html#numpy.chararray.transpose" title="numpy.chararray.transpose"><code class="xref py py-obj docutils literal notranslate"><span class="pre">transpose</span></code></a>(*axes)</p></td>
<td><p>Returns a view of the array with axes transposed.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.upper.html#numpy.chararray.upper" title="numpy.chararray.upper"><code class="xref py py-obj docutils literal notranslate"><span class="pre">upper</span></code></a>(self)</p></td>
<td><p>Return an array with the elements of <em class="xref py py-obj">self</em> converted to uppercase.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="numpy.chararray.view.html#numpy.chararray.view" title="numpy.chararray.view"><code class="xref py py-obj docutils literal notranslate"><span class="pre">view</span></code></a>([dtype, type])</p></td>
<td><p>New view of array with the same data.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="numpy.chararray.zfill.html#numpy.chararray.zfill" title="numpy.chararray.zfill"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zfill</span></code></a>(self, width)</p></td>
<td><p>Return the numeric string left-filled with zeros in a string of length <em class="xref py py-obj">width</em>.</p></td>
</tr>
</tbody>
</table>
</dd></dl>

</div>


          </div>
        </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container container-navbar-bottom">
      <div class="spc-navbar">
        
      </div>
    </div>
    <div class="container">
    <div class="footer">
    <div class="row-fluid">
    <ul class="inline pull-left">
      <li>
        &copy; Copyright 2008-2019, The SciPy community.
      </li>
      <li>
      Last updated on Feb 20, 2020.
      </li>
      <li>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.4.2.
      </li>
    </ul>
    </div>
    </div>
    </div>
  </body>
</html>